package com.briup.interfaces.impl;

import com.briup.interfaces.Configuration;
import com.briup.interfaces.Log;
import org.apache.log4j.Logger;

import java.util.Properties;


/**
 * 日志模块的具体事项
 * 借助log4j
 */
public class LogImpl implements Log {
    private Logger logger;

    public LogImpl() {
        // 对logger 进行初始化
        logger = Logger.getRootLogger();
    }

    @Override
    public void debug(String mag) {
        logger.debug(mag);
    }

    @Override
    public void info(String mag) {
        logger.info(mag);
    }

    @Override
    public void warn(String mag) {
        logger.warn(mag);
    }

    @Override
    public void error(String mag) {
        logger.error(mag);
    }

    @Override
    public void fatal(String mag) {
        logger.fatal(mag);
    }

    @Override
    public void init(Properties properties) {

    }

    @Override
    public void setConfiguration(Configuration configuration) {

    }
}
